GtkWindow: Handle non-square icons with height > width correctly
authorChristian Stadelmann <dev@genodeftest.de>
Sun, 3 Jun 2018 19:05:46 +0000 (21:05 +0200)
committerChristian Stadelmann <dev@genodeftest.de>
Sun, 3 Jun 2018 19:05:46 +0000 (21:05 +0200)
gtk/gtkwindow.c

index c6aa5425ff648fabc0bbf45e1df78eb060cdb0a5..b5f4b5af3dad7a970c53ad2ce594ca2ca0f6fafe 100644 (file)
@@ -4576,7 +4576,8 @@ icon_from_list (GList *list,
   for (l = list; l; l = l->next)
     {
       pixbuf = list->data;
-      if (gdk_pixbuf_get_width (pixbuf) <= size)
+      if (gdk_pixbuf_get_width (pixbuf) <= size &&
+          gdk_pixbuf_get_height (pixbuf) <= size)
         {
           best = g_object_ref (pixbuf);
           break;